'use strict';

module.exports = app => {
    class ClassController extends app.Controller {

        //我的班级列表
        async classlist(){
            const data = await this.service.class.getClass();
            await this.ctx.render("/my/classlist/classlist.html",{data});
        };

        //我的班级学生
        async studentlist(){
            const params = this.ctx.request.query;
            const data = await this.service.class.getStudentList(params);
            await this.ctx.render("/my/classlist/student-list.html",{data});
        }

        //我的学生详情
        async student(){
            const params = this.ctx.request.query;
            const data = await this.service.class.getStudent(params);
            await this.ctx.render("/my/classlist/student-info.html",{data});
        }

        //副监护人详情
        async guardian(){
            const params = this.ctx.request.query;
            const data = await this.service.class.getStudent(params);
            await this.ctx.render("/my/classlist/guardian.html",{data});
        }

    }
    return ClassController;
};

